#ifndef REQUEST_CREATOR_HH
# define REQUEST_CREATOR_HH

#include "request.hh"
#include "type.hh"

#include <boost/shared_ptr.hpp>

class RequestCreator
{
public:
  RequestCreator (): disconnecting_ (false) {}

  virtual boost::shared_ptr<Request> operator() (RequestType rqtype, const std::string& data) = 0;
  virtual boost::shared_ptr<Request> on_error () = 0;

  bool disconnecting () const { return disconnecting_; }
protected:
  bool disconnecting_;
};

#endif /// !REQUEST_CREATOR_HH
